var http = require("http");
var url = require("url");
var fs = require("fs");
var mysql = require("mysql");
var app = http.createServer();
app.listen(8010);
app.on("request",(req,res)=>{
    var objUrl=url.parse(req.url,true);
    if(objUrl.pathname=="/"){
        fs.readFile(__dirname+"/project/index.html",(err,buf)=>{
            res.end(buf);
        })
    }else if(objUrl.pathname.match(/css|js|jpg|png|gif/)!=null){
        fs.readFile(__dirname+"objUrl.pathname",(err,buf)=>{
            res.end(buf);
        })
    }
})